package com.olah.ws.dao;

import com.olah.common.entity.po.msg.system.SystemMsg;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

@Mapper
public interface SystemMsgDao {

    List<SystemMsg> readSystemMsg(Map<String, Object> map);

    void newSystemMsg(@Param("msg")SystemMsg msg);

    @Insert("UPDATE project_positioin SET pt_member_id = #{userId} WHERE pt_id = #{tagId}")
    void joinProject(Map<String, Integer> map);

    @Update("UPDATE message_system SET smsg_read = 1 WHERE smsg_id = #{id}")
    void doRead(@Param("id") int id);
}
